"use strict";
// 0. 抽象类一般作为父类使用
// 1. 抽象类规定不能直接实例化
// 2. 抽象类干的活类似interfa接口，只不过接口用于描述对象的属性类型 而它可以描述属性的工作内容
// 3. abstract关键字用于定义抽象类或者抽象方法
// 4. 抽象类中的抽象方法不能直接定义而应该像接口一样只能描述签名，并且抽象方法必须在子类中实现
var __extends = (this && this.__extends) || (function () {
    var extendStatics = function (d, b) {
        extendStatics = Object.setPrototypeOf ||
            ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
            function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
        return extendStatics(d, b);
    };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();
var Department = /** @class */ (function () {
    function Department(name) {
        this.name = name;
    }
    Department.prototype.printName = function () {
        console.log('Department name:' + this.name);
    };
    return Department;
}());
var AccountingDepartment = /** @class */ (function (_super) {
    __extends(AccountingDepartment, _super);
    function AccountingDepartment() {
        return _super.call(this, 'Accountting and auditing') || this;
    }
    AccountingDepartment.prototype.printMetting = function () {
        console.log('The Accounting Department meets each Monday at 10am.');
    };
    AccountingDepartment.prototype.generateReports = function () {
        console.log(' Generating accounting reports...');
    };
    return AccountingDepartment;
}(Department));
// let department: Department
// department = new Department() // 报错：无法实例化一个抽象类
var department = new AccountingDepartment();
department.printName(); // 'Department name:Accountting and auditing'
department.printMetting(); // 'The Accounting Department meets each Monday at 10am.'
department.generateReports(); // 'Generating accounting reports...'
